#ifndef CONFIG_H
#define CONFIG_H

#include "../global.h"


struct _CGI_FILE_CLASS_
{
    unsigned char py:1;
    unsigned char cgi:1;
    
};

union _CGI_FILE_CLASS
{
    unsigned char value;
    struct _CGI_FILE_CLASS_ file_class;
};



typedef struct _CONFIG_DATA_
{
    char ip[18];//监听的ip地址
    short port;//端口号
    char html_path[1024];//默认文件路径
    char html_file_name[256];//默认文件名
    char html_file_404[256];//404错误文件

    char is_use_cgi;
    union _CGI_FILE_CLASS cgi_file_class;
}CONFIG_DATA;
extern CONFIG_DATA base_data;
extern int ConfigMiniWeb(const char *file_path,CONFIG_DATA *data);

#endif
